package com.project.frba.bifront.client.model;

import java.util.HashMap;
import java.util.Map;

import com.google.gwt.user.client.rpc.IsSerializable;

public class CubeDataRow implements IsSerializable{
	
	private String metricValue;
	private Map<String, String> propertiesValues = new HashMap<String, String>();
	
	public CubeDataRow(){
	}
	
	public CubeDataRow(String metricValue){
		this.setMetricValue(metricValue);
	}
	
	public void setMetricValue(String metricValue){
		this.metricValue = metricValue;
	}
	
	public String getData(){
		return this.metricValue;
	}
	
	public void addPropertyValue(String propertyName, String value){
		this.propertiesValues.put(propertyName, value);		
	}
	
	public String getValue(String propertyName){
		return this.propertiesValues.get(propertyName);
	}

	public Boolean isFromParent(String parentPropertyName, String parentValue) {
		if(propertiesValues.get(parentPropertyName).equals(parentValue)){
			return true;
		}
		return false;
	}
	
	
	
	
	

	
	
	

}
